<?php
	error_reporting(E_ALL);
	ini_set('display_errors', '1');
	include('DB.class.php');
	include('functions.php');
	
  $patients = DB::getInstance()->getPatientenValues();
  $firstCharacter = '';
	foreach($patients as $patient){
    if(substr($patient[2], 0, 1)!= $firstCharacter){
      echo "                        <li class='sep'>" . substr($patient[2], 0, 1) . "</li>";
    }
    $firstCharacter = substr($patient[2], 0, 1);    
    echo "                        <li class='arrow'><a href='#patient' onclick='get_patient(" . $patient[0] . ")'>" . $patient[2]. " <em>". $patient[1] . "</em></a><p>" . $patient[4] . " " . $patient[5] . "</p></li>";
  }
?>

